/*
 * Copyright (c) 2025 GuoKaiHong (Shenzhen) Technology Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */



import { NameMapUtil } from '../../utils/NameMapUtil';
import { IDrvDevice } from './IDrvDevice';

export class DrvDevice implements IDrvDevice {

  getInfo(key: string): string {
    let valueStr: string = ""
    let nameMap = NameMapUtil.nameMap;
    if (nameMap != null) {
      switch (key) {
        case "name":
          valueStr = nameMap.name
          break;
        case "model":
          valueStr = nameMap.model
          break;
        case "manufacturer":
          valueStr = nameMap.manufacturer
          break;
        case "uuid":
          valueStr = nameMap.uuid
          break;
        case "version":
          valueStr = nameMap.version
          break;
        case "IDL":
          valueStr = nameMap.IDL
          break;
      }
    }
    return valueStr;
  }
}